package com.baor.controller;

import com.baor.domain.field.TagField;
import com.baor.service.TagFieldService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/tagField")
public class TagFieldController {

    @Autowired
    private TagFieldService tagFieldService;

    @RequestMapping("/tagFieldList")
    public AjaxResult<?> tagFieldList(@RequestBody Map<String, Object> params) {
        return tagFieldService.tagFieldList(params);
    }

    @RequestMapping("/tagFieldInfo")
    public AjaxResult<?> tagFieldInfo(@RequestBody TagField tagField) {
        return tagFieldService.tagFieldInfo(tagField);
    }


    @RequestMapping("/insertTagField")
    public AjaxResult<?> insertTagField(@RequestBody TagField tagField) {
        return tagFieldService.insertTagField(tagField);
    }

    @RequestMapping("/updateTagField")
    public AjaxResult<?> updateTagField(@RequestBody TagField tagField) {
        return tagFieldService.updateTagField(tagField);
    }

    @RequestMapping("/deleteTagField")
    public AjaxResult<?> deleteTagField(@RequestBody TagField tagField) {
        return tagFieldService.deleteTagField(tagField);
    }

    @RequestMapping("/tagFieldSelect")
    public AjaxResult<?> tagFieldSelect(@RequestBody Integer siteId) {
        return tagFieldService.tagFieldSelect(siteId);
    }
}
